package com.tlxch.mapper;

import com.tlxch.dto.Shabitdto;
import com.tlxch.dto.TStudentTAlertdto;
import com.tlxch.pojo.SHabit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SHabitMapper {
    int deleteByPrimaryKey(Integer shId);

    int insert(SHabit record);

    int insertSelective(SHabit record);

    SHabit selectByPrimaryKey(Integer shId);

    int updateByPrimaryKeySelective(SHabit record);

    int updateByPrimaryKeyWithBLOBs(SHabit record);

    int updateByPrimaryKey(SHabit record);

    List<Shabitdto> getByStuId(String sSid);

//    @Select("SELECT sh_id, sh_sid, sh_hcontent, sh_frequency, sh_createtime, sh_duration\n" +
//            "FROM s_habit\n" +
//            "WHERE sh_sid = #{sSid}" +
//            "ORDER BY sh_createtime DESC")
    List<SHabit> getBySid(String sSid);

    SHabit getbystu(TStudentTAlertdto student);

    List<SHabit> getsHabit();
}